package ms.maplestory.boot.client.character.quest.requirement;

import lombok.Getter;
import lombok.Setter;
import ms.maplestory.boot.client.character.Char;
import ms.maplestory.boot.loaders.DatSerializable;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;

@Getter
@Setter
public class QuestStartItemRequirement implements QuestStartRequirement {

    private int id;
    private int quantity;

    @Override
    public boolean hasRequirements(Char chr) {
        return false;
    }

    @Override
    public void write(DataOutputStream dos) throws IOException {
        dos.writeInt(getId());
        dos.writeInt(getQuantity());
    }

    @Override
    public DatSerializable load(DataInputStream dis) throws IOException {
        QuestStartItemRequirement questStart = new QuestStartItemRequirement();
        questStart.setId(dis.readInt());
        questStart.setQuantity(dis.readInt());
        return questStart;
    }
}
